package rpcservice

import (
	"demo/gate/conf"
	"znet/zmodule/zrpcservice"
	"znet/zmodule"
	"znet/leaf/module"
)

var (
	skeleton = zmodule.NewSkeleton()
	ChanRPC  = skeleton.ChanRPCServer
	Module	 = new(Client)
)

type Client struct {
	*module.Skeleton
	*zrpcservice.RpcServiceModule
}
func (this *Client) OnInit() {
	this.Skeleton 		= skeleton
	this.RpcServiceModule 	= &zrpcservice.RpcServiceModule{
		ConfServer:conf.Server.Service,
	}
	this.RpcServiceModule.Init()
	for _,item := range conf.Server.RpcServices{
		this.AddClient(item)
	}
}
func (this *Client) OnDestroy() {
}